<h1>Products#index</h1>
<p>Find me in app/views/products/index.html.erb</p>

<% if @products.present? %>
<ul>
	<% @products.each do |product|%>
	<li><%= product.name %> | 
		<%= product.pricing%>$     - 
		<%=link_to "edit", edit_product_path(product.id)%>
		<%=link_to "delete", product_path(product.id), :confirm => "Are you sure dude?", :method => :delete%></br>
		<%= product.description%>
		<%= product.category_id%>
		</br>Comments: </br></br>
		<% @comments.each do |comment|
			if comment.product_id == product.id
			 	%><%= comment.author %></br> 
			 	<%= comment.content %></br></br><%
			end
		end %>


		</li>

	<%end%>
</ul>
<% end %>